# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=poxml
pkgver=22.04.3
pkgrel=0
arch="all !armhf !riscv64"
url="https://www.kde.org/applications/development/"
pkgdesc="Translates DocBook XML files using gettext po files"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kdoctools-dev gettext-dev samurai"
source="https://download.kde.org/stable/release-service/$pkgver/src/poxml-$pkgver.tar.xz"
subpackages="$pkgname-doc"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
1efe9913cd0337eb47b85dfd64b2ce43cd8a0b9c32b8ba99c43d94aa68dda028255fbbac4f83a7af393f7a0b2f653d7287c5376b1a3beafe36fa56fbb28ce56b  poxml-22.04.3.tar.xz
"
